import 'package:json_annotation/json_annotation.dart';

part 'job.g.dart';

@JsonSerializable()
class JobModel {
  final String title;

  final String code;

  final String name;

  final String processes;

  final String responsible;

  final String createTime;

  JobModel({
    required this.title,
    required this.code,
    required this.name,
    required this.processes,
    required this.responsible,
    required this.createTime,
  });

  factory JobModel.fromJson(Map<String, dynamic> json) =>
      _$JobModelFromJson(json);

  Map<String, dynamic> toJson() => _$JobModelToJson(this);

  @override
  String toString() {
    return toJson().toString();
  }
}
